/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "TRoomSale")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TRoomSale.findAll", query = "SELECT t FROM TRoomSale t"),
    @NamedQuery(name = "TRoomSale.findByTRSId", query = "SELECT t FROM TRoomSale t WHERE t.tRSId = :tRSId"),
    @NamedQuery(name = "TRoomSale.findByTRSDate", query = "SELECT t FROM TRoomSale t WHERE t.tRSDate = :tRSDate"),
    @NamedQuery(name = "TRoomSale.findByTRSName", query = "SELECT t FROM TRoomSale t WHERE t.tRSName = :tRSName"),
    @NamedQuery(name = "TRoomSale.findByTRSAddr", query = "SELECT t FROM TRoomSale t WHERE t.tRSAddr = :tRSAddr"),
    @NamedQuery(name = "TRoomSale.findByTRSPhone", query = "SELECT t FROM TRoomSale t WHERE t.tRSPhone = :tRSPhone"),
    @NamedQuery(name = "TRoomSale.findByTRSRtn", query = "SELECT t FROM TRoomSale t WHERE t.tRSRtn = :tRSRtn"),
    @NamedQuery(name = "TRoomSale.findByTrscsv", query = "SELECT t FROM TRoomSale t WHERE t.trscsv = :trscsv")})
public class TRoomSale implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "TRSId")
    private Integer tRSId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TRSDate")
    @Temporal(TemporalType.DATE)
    private Date tRSDate;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 40)
    @Column(name = "TRSName")
    private String tRSName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 80)
    @Column(name = "TRSAddr")
    private String tRSAddr;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 40)
    @Column(name = "TRSPhone")
    private String tRSPhone;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TRSRtn")
    private boolean tRSRtn;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 250)
    @Column(name = "TRSCSV")
    private String trscsv;

    public TRoomSale() {
    }

    public TRoomSale(Integer tRSId) {
        this.tRSId = tRSId;
    }

    public TRoomSale(Integer tRSId, Date tRSDate, String tRSName, String tRSAddr, String tRSPhone, boolean tRSRtn, String trscsv) {
        this.tRSId = tRSId;
        this.tRSDate = tRSDate;
        this.tRSName = tRSName;
        this.tRSAddr = tRSAddr;
        this.tRSPhone = tRSPhone;
        this.tRSRtn = tRSRtn;
        this.trscsv = trscsv;
    }

    public Integer getTRSId() {
        return tRSId;
    }

    public void setTRSId(Integer tRSId) {
        this.tRSId = tRSId;
    }

    public Date getTRSDate() {
        return tRSDate;
    }

    public void setTRSDate(Date tRSDate) {
        this.tRSDate = tRSDate;
    }

    public String getTRSName() {
        return tRSName;
    }

    public void setTRSName(String tRSName) {
        this.tRSName = tRSName;
    }

    public String getTRSAddr() {
        return tRSAddr;
    }

    public void setTRSAddr(String tRSAddr) {
        this.tRSAddr = tRSAddr;
    }

    public String getTRSPhone() {
        return tRSPhone;
    }

    public void setTRSPhone(String tRSPhone) {
        this.tRSPhone = tRSPhone;
    }

    public boolean getTRSRtn() {
        return tRSRtn;
    }

    public void setTRSRtn(boolean tRSRtn) {
        this.tRSRtn = tRSRtn;
    }

    public String getTrscsv() {
        return trscsv;
    }

    public void setTrscsv(String trscsv) {
        this.trscsv = trscsv;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tRSId != null ? tRSId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TRoomSale)) {
            return false;
        }
        TRoomSale other = (TRoomSale) object;
        if ((this.tRSId == null && other.tRSId != null) || (this.tRSId != null && !this.tRSId.equals(other.tRSId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.TRoomSale[ tRSId=" + tRSId + " ]";
    }
    
}
